object frmGerarFaturas: TfrmGerarFaturas
  Left = 413
  Top = 203
  BorderStyle = bsDialog
  Caption = 'Gerar faturas'
  ClientHeight = 522
  ClientWidth = 936
  Color = clBtnFace
  Font.Charset = ANSI_CHARSET
  Font.Color = clGreen
  Font.Height = -11
  Font.Name = 'Verdana'
  Font.Style = []
  OldCreateOrder = False
  Position = poScreenCenter
  OnCloseQuery = FormCloseQuery
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object Panel1: TPanel
    Left = 0
    Top = 474
    Width = 936
    Height = 48
    Align = alBottom
    BevelInner = bvRaised
    BevelOuter = bvLowered
    TabOrder = 0
    object btnGravar: TSpeedButton
      Left = 62
      Top = 4
      Width = 59
      Height = 41
      Caption = 'Gravar'
      Enabled = False
      Flat = True
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -12
      Font.Name = 'Arial'
      Font.Style = []
      Glyph.Data = {
        76010000424D7601000000000000760000002800000020000000100000000100
        04000000000000010000120B0000120B00001000000000000000000000000000
        800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00555555555555
        555555555555555555555555555555555555555555FF55555555555559055555
        55555555577FF5555555555599905555555555557777F5555555555599905555
        555555557777FF5555555559999905555555555777777F555555559999990555
        5555557777777FF5555557990599905555555777757777F55555790555599055
        55557775555777FF5555555555599905555555555557777F5555555555559905
        555555555555777FF5555555555559905555555555555777FF55555555555579
        05555555555555777FF5555555555557905555555555555777FF555555555555
        5990555555555555577755555555555555555555555555555555}
      Layout = blGlyphTop
      NumGlyphs = 2
      ParentFont = False
      OnClick = btnGravarClick
    end
    object btnCancelar: TSpeedButton
      Left = 238
      Top = 4
      Width = 59
      Height = 41
      Caption = 'Cancelar'
      Flat = True
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -12
      Font.Name = 'Arial'
      Font.Style = []
      Glyph.Data = {
        76010000424D7601000000000000760000002800000020000000100000000100
        04000000000000010000130B0000130B00001000000000000000000000000000
        800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
        3333333333FFFFF3333333333999993333333333F77777FFF333333999999999
        3333333777333777FF3333993333339993333377FF3333377FF3399993333339
        993337777FF3333377F3393999333333993337F777FF333337FF993399933333
        399377F3777FF333377F993339993333399377F33777FF33377F993333999333
        399377F333777FF3377F993333399933399377F3333777FF377F993333339993
        399377FF3333777FF7733993333339993933373FF3333777F7F3399933333399
        99333773FF3333777733339993333339933333773FFFFFF77333333999999999
        3333333777333777333333333999993333333333377777333333}
      Layout = blGlyphTop
      NumGlyphs = 2
      ParentFont = False
      Visible = False
    end
    object btnFechar: TSpeedButton
      Left = 876
      Top = 4
      Width = 59
      Height = 41
      Caption = 'Fechar'
      Flat = True
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -12
      Font.Name = 'Arial'
      Font.Style = []
      Glyph.Data = {
        76010000424D7601000000000000760000002800000020000000100000000100
        04000000000000010000120B0000120B00001000000000000000000000000000
        800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00330000000000
        03333377777777777F333301111111110333337F333333337F33330111111111
        0333337F333333337F333301111111110333337F333333337F33330111111111
        0333337F333333337F333301111111110333337F333333337F33330111111111
        0333337F3333333F7F333301111111B10333337F333333737F33330111111111
        0333337F333333337F333301111111110333337F33FFFFF37F3333011EEEEE11
        0333337F377777F37F3333011EEEEE110333337F37FFF7F37F3333011EEEEE11
        0333337F377777337F333301111111110333337F333333337F33330111111111
        0333337FFFFFFFFF7F3333000000000003333377777777777333}
      Layout = blGlyphTop
      NumGlyphs = 2
      ParentFont = False
      OnClick = btnFecharClick
    end
    object btnGerar: TSpeedButton
      Left = 3
      Top = 4
      Width = 59
      Height = 41
      Caption = 'Gerar'
      Flat = True
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -12
      Font.Name = 'Arial'
      Font.Style = []
      Glyph.Data = {
        76010000424D7601000000000000760000002800000020000000100000000100
        04000000000000010000120B0000120B00001000000000000000000000000000
        800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00370777033333
        3330337F3F7F33333F3787070003333707303F737773333373F7007703333330
        700077337F3333373777887007333337007733F773F333337733700070333333
        077037773733333F7F37703707333300080737F373333377737F003333333307
        78087733FFF3337FFF7F33300033330008073F3777F33F777F73073070370733
        078073F7F7FF73F37FF7700070007037007837773777F73377FF007777700730
        70007733FFF77F37377707700077033707307F37773F7FFF7337080777070003
        3330737F3F7F777F333778080707770333333F7F737F3F7F3333080787070003
        33337F73FF737773333307800077033333337337773373333333}
      Layout = blGlyphTop
      NumGlyphs = 2
      ParentFont = False
      OnClick = btnGerarClick
    end
    object btnJustificativa: TSpeedButton
      Left = 121
      Top = 4
      Width = 80
      Height = 41
      Caption = 'Justificativa'
      Flat = True
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -12
      Font.Name = 'Arial'
      Font.Style = []
      Glyph.Data = {
        76010000424D7601000000000000760000002800000020000000100000000100
        04000000000000010000130B0000130B00001000000000000000000000000000
        800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
        333333333333333FF3FF3333333333CC30003333333333773777333333333C33
        3000333FF33337F33777339933333C3333333377F33337F3333F339933333C33
        33003377333337F33377333333333C333300333F333337F33377339333333C33
        3333337FF3333733333F33993333C33333003377FF33733333773339933C3333
        330033377FF73F33337733339933C33333333FF377F373F3333F993399333C33
        330077F377F337F33377993399333C33330077FF773337F33377399993333C33
        33333777733337F333FF333333333C33300033333333373FF7773333333333CC
        3000333333333377377733333333333333333333333333333333}
      Layout = blGlyphTop
      NumGlyphs = 2
      ParentFont = False
      OnClick = btnJustificativaClick
    end
  end
  object Panel2: TPanel
    Left = 0
    Top = 349
    Width = 936
    Height = 125
    Align = alBottom
    BevelInner = bvRaised
    BevelOuter = bvLowered
    TabOrder = 1
    object DBGrid1: TDBGrid
      Left = 2
      Top = 2
      Width = 932
      Height = 121
      Align = alClient
      Ctl3D = False
      DataSource = DS_Padrao
      Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
      ParentCtl3D = False
      TabOrder = 0
      TitleFont.Charset = ANSI_CHARSET
      TitleFont.Color = clGreen
      TitleFont.Height = -11
      TitleFont.Name = 'Verdana'
      TitleFont.Style = []
      Columns = <
        item
          Expanded = False
          FieldName = 'ds_fatura_parcela'
          Title.Caption = 'Desc.Parcela'
          Width = 121
          Visible = True
        end
        item
          Alignment = taCenter
          Expanded = False
          FieldName = 'parcela'
          Title.Alignment = taCenter
          Title.Caption = 'Parcela'
          Width = 53
          Visible = True
        end
        item
          Alignment = taCenter
          Expanded = False
          FieldName = 'dt_vencimento'
          Title.Alignment = taCenter
          Title.Caption = 'Vencimento'
          Width = 88
          Visible = True
        end
        item
          Alignment = taRightJustify
          Expanded = False
          FieldName = 'sValorFatura'
          Title.Alignment = taRightJustify
          Title.Caption = 'Valor Innovi'
          Width = 123
          Visible = True
        end
        item
          Alignment = taRightJustify
          Expanded = False
          FieldName = 'sValorRepresentante'
          Title.Caption = 'Valor Representante'
          Visible = True
        end>
    end
  end
  object Panel3: TPanel
    Left = 0
    Top = 224
    Width = 936
    Height = 125
    Align = alBottom
    BevelInner = bvRaised
    BevelOuter = bvLowered
    TabOrder = 2
    object Label5: TLabel
      Left = 7
      Top = 3
      Width = 43
      Height = 13
      Caption = 'Pedido:'
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -11
      Font.Name = 'Verdana'
      Font.Style = []
      ParentFont = False
    end
    object lblCodigoPedido: TLabel
      Left = 72
      Top = 3
      Width = 106
      Height = 14
      Caption = 'lblCodigoPedido'
      Font.Charset = ANSI_CHARSET
      Font.Color = clGreen
      Font.Height = -12
      Font.Name = 'Verdana'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object Label2: TLabel
      Left = 7
      Top = 25
      Width = 130
      Height = 14
      Caption = 'Valor Total Pedido: '
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -12
      Font.Name = 'Verdana'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object lblValorTotal: TLabel
      Left = 169
      Top = 25
      Width = 52
      Height = 14
      Caption = '0000,00'
      Font.Charset = ANSI_CHARSET
      Font.Color = clGreen
      Font.Height = -12
      Font.Name = 'Verdana'
      Font.Style = []
      ParentFont = False
    end
    object Label3: TLabel
      Left = 5
      Top = 99
      Width = 83
      Height = 13
      Caption = 'Data Emiss'#227'o:'
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -11
      Font.Name = 'Verdana'
      Font.Style = []
      ParentFont = False
    end
    object Label9: TLabel
      Left = 6
      Top = 70
      Width = 144
      Height = 13
      Caption = 'Condi'#231#227'o de pagamento:'
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -11
      Font.Name = 'Verdana'
      Font.Style = []
      ParentFont = False
    end
    object Label8: TLabel
      Left = 8
      Top = 45
      Width = 124
      Height = 14
      Caption = 'Valor Total Fatura:'
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -12
      Font.Name = 'Verdana'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object lblTotFatura: TLabel
      Left = 170
      Top = 45
      Width = 52
      Height = 14
      Caption = '0000,00'
      Font.Charset = ANSI_CHARSET
      Font.Color = clGreen
      Font.Height = -12
      Font.Name = 'Verdana'
      Font.Style = []
      ParentFont = False
    end
    object Label11: TLabel
      Left = 485
      Top = 69
      Width = 58
      Height = 13
      Caption = 'Desconto:'
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -11
      Font.Name = 'Verdana'
      Font.Style = []
      ParentFont = False
    end
    object Label12: TLabel
      Left = 576
      Top = 70
      Width = 12
      Height = 13
      Caption = '%'
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -11
      Font.Name = 'Verdana'
      Font.Style = []
      ParentFont = False
    end
    object Label1: TLabel
      Left = 403
      Top = 98
      Width = 141
      Height = 13
      Caption = 'Quantidade de Volumes:'
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -11
      Font.Name = 'Verdana'
      Font.Style = []
      ParentFont = False
    end
    object Label4: TLabel
      Left = 282
      Top = 45
      Width = 178
      Height = 14
      Caption = 'Quantidade total Faturado:'
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -12
      Font.Name = 'Verdana'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object lblQtdFaturado: TLabel
      Left = 464
      Top = 45
      Width = 32
      Height = 14
      Caption = '0000'
      Font.Charset = ANSI_CHARSET
      Font.Color = clGreen
      Font.Height = -12
      Font.Name = 'Verdana'
      Font.Style = []
      ParentFont = False
    end
    object Label6: TLabel
      Left = 283
      Top = 25
      Width = 113
      Height = 14
      Caption = 'Valor Atualizado:'
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -12
      Font.Name = 'Verdana'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object lblVlAtualizado: TLabel
      Left = 441
      Top = 25
      Width = 52
      Height = 14
      Caption = '0000,00'
      Font.Charset = ANSI_CHARSET
      Font.Color = clGreen
      Font.Height = -12
      Font.Name = 'Verdana'
      Font.Style = []
      ParentFont = False
    end
    object Label7: TLabel
      Left = 183
      Top = 99
      Width = 129
      Height = 13
      Caption = 'Data Ger. Pagamento:'
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -11
      Font.Name = 'Verdana'
      Font.Style = []
      ParentFont = False
    end
    object dblCondPagamento: TDBLookupComboBox
      Left = 160
      Top = 67
      Width = 273
      Height = 19
      Ctl3D = False
      Font.Charset = ANSI_CHARSET
      Font.Color = clGreen
      Font.Height = -11
      Font.Name = 'Verdana'
      Font.Style = []
      KeyField = 'cd_condicaopagamento'
      ListField = 'descricao'
      ListSource = DS_CondPagamento
      ParentCtl3D = False
      ParentFont = False
      TabOrder = 0
      OnClick = dblCondPagamentoClick
      OnEnter = DBEdit6Enter
      OnExit = dblCondPagamentoExit
    end
    object Edit1: TEdit
      Left = 547
      Top = 95
      Width = 45
      Height = 19
      Ctl3D = False
      ParentCtl3D = False
      TabOrder = 3
    end
    object medtEntrega: TMaskEdit
      Left = 93
      Top = 95
      Width = 78
      Height = 19
      Ctl3D = False
      EditMask = '!99/99/9999;1;_'
      MaxLength = 10
      ParentCtl3D = False
      TabOrder = 1
      Text = '  /  /    '
    end
    object medtGeracao: TMaskEdit
      Left = 318
      Top = 95
      Width = 78
      Height = 19
      Ctl3D = False
      EditMask = '!99/99/9999;1;_'
      MaxLength = 10
      ParentCtl3D = False
      TabOrder = 2
      Text = '  /  /    '
    end
    object edtDesconto: TEdit
      Left = 546
      Top = 67
      Width = 29
      Height = 19
      Ctl3D = False
      ParentCtl3D = False
      TabOrder = 4
    end
    object rgModalidade: TRadioGroup
      Left = 606
      Top = 13
      Width = 107
      Height = 105
      Caption = 'Modalidade'
      Items.Strings = (
        'Boleto'
        'Cheque'
        #192' Vista')
      TabOrder = 5
    end
  end
  object Panel4: TPanel
    Left = 0
    Top = 46
    Width = 936
    Height = 178
    Align = alClient
    BevelInner = bvRaised
    BevelOuter = bvLowered
    TabOrder = 3
    object DBGrid2: TDBGrid
      Left = 2
      Top = 2
      Width = 932
      Height = 174
      Align = alClient
      Ctl3D = False
      DataSource = DS_FaturaProduto
      Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
      ParentCtl3D = False
      TabOrder = 0
      TitleFont.Charset = ANSI_CHARSET
      TitleFont.Color = clGreen
      TitleFont.Height = -11
      TitleFont.Name = 'Verdana'
      TitleFont.Style = []
      OnDblClick = DBGrid2DblClick
      Columns = <
        item
          Expanded = False
          FieldName = 'DS_IDENTIFICACAO'
          Title.Caption = 'Ident.'
          Width = 37
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'PROD'
          Title.Caption = 'Produto'
          Width = 127
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'MAT'
          Title.Caption = 'Material'
          Width = 133
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'COR_SILK1'
          Title.Caption = 'Cor'
          Width = 134
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'DS_TAMANHO_PRODUTO'
          Title.Caption = 'Tamanho'
          Width = 66
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'QUANTIDADE'
          Title.Caption = 'Qtd.Pedido'
          Width = 68
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'QTD_FAT'
          Font.Charset = ANSI_CHARSET
          Font.Color = clMaroon
          Font.Height = -11
          Font.Name = 'Verdana'
          Font.Style = []
          Title.Caption = 'Qtd.Faturada'
          Title.Font.Charset = ANSI_CHARSET
          Title.Font.Color = clMaroon
          Title.Font.Height = -11
          Title.Font.Name = 'Verdana'
          Title.Font.Style = []
          Width = 80
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'QTD_REST'
          Title.Caption = 'Qtd.Restante'
          Width = 81
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'VALOR_UNITARIO'
          Title.Alignment = taRightJustify
          Title.Caption = 'Valor Unit'#225'rio'
          Width = 83
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'sDsDescondo'
          Title.Caption = 'Desconto'
          Width = 115
          Visible = True
        end>
    end
  end
  object GroupBox4: TGroupBox
    Left = 0
    Top = 0
    Width = 936
    Height = 46
    Align = alTop
    Caption = 'Identifica'#231#227'o dos produtos'
    Font.Charset = ANSI_CHARSET
    Font.Color = clGreen
    Font.Height = -11
    Font.Name = 'Verdana'
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 4
    object Label15: TLabel
      Left = 17
      Top = 22
      Width = 148
      Height = 14
      Caption = 'Quantidade Faturada: '
      Font.Charset = ANSI_CHARSET
      Font.Color = clRed
      Font.Height = -12
      Font.Name = 'Verdana'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object edtQtdFaturada: TEdit
      Left = 166
      Top = 19
      Width = 121
      Height = 19
      Ctl3D = False
      ParentCtl3D = False
      TabOrder = 0
      OnKeyPress = edtQtdFaturadaKeyPress
    end
  end
  object QR_Padrao: TADOQuery
    Connection = dtmSisnnovi.connSisnnovi
    CursorType = ctStatic
    OnCalcFields = QR_PadraoCalcFields
    Parameters = <>
    SQL.Strings = (
      'SELECT * FROM TB_FATURA_PARCELA')
    Left = 72
    Top = 389
    object QR_PadraosValorFatura: TStringField
      FieldKind = fkCalculated
      FieldName = 'sValorFatura'
      Calculated = True
    end
    object QR_Padraocd_fatura_parcela: TAutoIncField
      FieldName = 'cd_fatura_parcela'
      ReadOnly = True
    end
    object QR_Padraocd_fatura: TIntegerField
      FieldName = 'cd_fatura'
    end
    object QR_Padraoparcela: TIntegerField
      FieldName = 'parcela'
    end
    object QR_Padraodt_vencimento: TDateTimeField
      FieldName = 'dt_vencimento'
      EditMask = '00/00/0000'
    end
    object QR_Padraovalor_fatura: TBCDField
      FieldName = 'valor_fatura'
      Precision = 19
    end
    object QR_Padraodt_recebimento: TDateTimeField
      FieldName = 'dt_recebimento'
    end
    object QR_Padraovalor_recebido: TBCDField
      FieldName = 'valor_recebido'
      Precision = 19
    end
    object QR_Padraods_fatura_parcela: TWideStringField
      FieldName = 'ds_fatura_parcela'
      Size = 50
    end
    object QR_Padraocd_pagamento: TIntegerField
      FieldName = 'cd_pagamento'
    end
    object QR_PadraoBMAR: TBooleanField
      FieldName = 'BMAR'
    end
    object QR_Padraovalor_desconto: TBCDField
      FieldName = 'valor_desconto'
      Precision = 19
    end
    object QR_Padraovalor_representante: TBCDField
      FieldName = 'valor_representante'
      Precision = 19
    end
    object QR_PadraosValorRepresentante: TStringField
      FieldKind = fkCalculated
      FieldName = 'sValorRepresentante'
      Calculated = True
    end
  end
  object DS_Padrao: TDataSource
    DataSet = QR_Padrao
    Left = 112
    Top = 389
  end
  object QR_CondPagamento: TADOQuery
    Connection = dtmSisnnovi.connSisnnovi
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT * FROM TB_CONDICAO_PAGAMENTO')
    Left = 430
    Top = 340
  end
  object DS_CondPagamento: TDataSource
    DataSet = QR_CondPagamento
    Left = 433
    Top = 388
  end
  object QR_Temp: TADOQuery
    Connection = dtmSisnnovi.connSisnnovi
    CursorType = ctStatic
    Parameters = <>
    Left = 651
    Top = 344
  end
  object QR_FaturaProduto: TADOQuery
    Connection = dtmSisnnovi.connSisnnovi
    CursorType = ctStatic
    Parameters = <
      item
        Name = 'CD_FATURA'
        Attributes = [paNullable]
        DataType = ftWideString
        NumericScale = 255
        Precision = 255
        Size = 510
        Value = Null
      end
      item
        Name = 'CD_PEDIDO'
        Attributes = [paNullable]
        DataType = ftWideString
        NumericScale = 255
        Precision = 255
        Size = 510
        Value = Null
      end>
    SQL.Strings = (
      
        'SELECT PP.CD_DESCONTO, PP.CD_PRODUTO_PEDIDO, P.DESCRICAO AS PROD' +
        ', M.DESCRICAO AS MAT, PP.DS_TAMANHO_PRODUTO , PP.COR_SILK1, PP.C' +
        'D_PRODUTO, PP.CD_PEDIDO, PP.QUANTIDADE, PP.VALOR_UNITARIO,'
      
        '( SELECT IIF(ISNULL(SUM(QUANTIDADE)),0,SUM(QUANTIDADE)) FROM TB_' +
        'FATURA_PRODUTO FP'
      '  WHERE PP.CD_PRODUTO_PEDIDO = FP.CD_PRODUTO_PEDIDO'
      '  AND FP.CD_FATURA = :CD_FATURA) AS QTD_FAT, '
      
        'QUANTIDADE - ( SELECT IIF(ISNULL(SUM(QUANTIDADE)),0,SUM(QUANTIDA' +
        'DE)) FROM TB_FATURA_PRODUTO FP'
      '  WHERE PP.CD_PRODUTO_PEDIDO = FP.CD_PRODUTO_PEDIDO'
      '  ) AS QTD_REST, PP.DS_IDENTIFICACAO'
      'FROM TB_PRODUTO_PEDIDO PP, TB_PRODUTO P, TB_MATERIAL M'
      'WHERE CD_PEDIDO = :CD_PEDIDO'
      'AND PP.CD_PRODUTO = P.CD_PRODUTO'
      'AND PP.CD_MATERIAL1 = M.CD_MATERIAL')
    Left = 296
    Top = 145
    object QR_FaturaProdutoPROD: TWideStringField
      FieldName = 'PROD'
      Size = 50
    end
    object QR_FaturaProdutoMAT: TWideStringField
      FieldName = 'MAT'
      Size = 50
    end
    object QR_FaturaProdutoDS_TAMANHO_PRODUTO: TWideStringField
      FieldName = 'DS_TAMANHO_PRODUTO'
      Size = 50
    end
    object QR_FaturaProdutoCD_PRODUTO: TIntegerField
      FieldName = 'CD_PRODUTO'
    end
    object QR_FaturaProdutoCD_PEDIDO: TWideStringField
      FieldName = 'CD_PEDIDO'
      Size = 50
    end
    object QR_FaturaProdutoQUANTIDADE: TIntegerField
      FieldName = 'QUANTIDADE'
    end
    object QR_FaturaProdutoVALOR_UNITARIO: TFloatField
      FieldName = 'VALOR_UNITARIO'
    end
    object QR_FaturaProdutoQTD_FAT: TFloatField
      FieldName = 'QTD_FAT'
    end
    object QR_FaturaProdutoQTD_REST: TFloatField
      FieldName = 'QTD_REST'
      ReadOnly = True
    end
    object QR_FaturaProdutoCD_PRODUTO_PEDIDO: TAutoIncField
      FieldName = 'CD_PRODUTO_PEDIDO'
      ReadOnly = True
    end
    object wdstrngfldQR_FaturaProdutoCOR_SILK1: TWideStringField
      FieldName = 'COR_SILK1'
      Size = 50
    end
    object QR_FaturaProdutoCD_DESCONTO: TIntegerField
      FieldName = 'CD_DESCONTO'
    end
    object QR_FaturaProdutosDsDescondo: TStringField
      FieldKind = fkLookup
      FieldName = 'sDsDescondo'
      LookupDataSet = QR_Desconto
      LookupKeyFields = 'cd_desconto'
      LookupResultField = 'descricao'
      KeyFields = 'CD_DESCONTO'
      Lookup = True
    end
    object QR_FaturaProdutoDS_IDENTIFICACAO: TWideStringField
      FieldName = 'DS_IDENTIFICACAO'
      Size = 50
    end
  end
  object QR_ProdutoPedido: TADOQuery
    Connection = dtmSisnnovi.connSisnnovi
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT * FROM TB_PRODUTO_PEDIDO')
    Left = 503
    Top = 369
    object QR_ProdutoPedidosDescProduto: TStringField
      FieldKind = fkLookup
      FieldName = 'sDescProduto'
      LookupKeyFields = 'cd_produto'
      LookupResultField = 'descricao'
      KeyFields = 'cd_produto'
      Lookup = True
    end
    object QR_ProdutoPedidocd_produto_pedido: TAutoIncField
      FieldName = 'cd_produto_pedido'
      ReadOnly = True
    end
    object QR_ProdutoPedidocd_pedido: TWideStringField
      FieldName = 'cd_pedido'
      Size = 50
    end
    object QR_ProdutoPedidocd_produto: TIntegerField
      FieldName = 'cd_produto'
    end
    object QR_ProdutoPedidocd_material1: TIntegerField
      FieldName = 'cd_material1'
    end
    object QR_ProdutoPedidoquantidade: TIntegerField
      FieldName = 'quantidade'
    end
    object QR_ProdutoPedidoquantidade_restante: TIntegerField
      FieldName = 'quantidade_restante'
    end
    object QR_ProdutoPedidovalor_unitario: TFloatField
      FieldName = 'valor_unitario'
    end
    object QR_ProdutoPedidosDescMaterial: TStringField
      FieldKind = fkLookup
      FieldName = 'sDescMaterial'
      LookupKeyFields = 'cd_material'
      LookupResultField = 'descricao'
      KeyFields = 'cd_material1'
      Lookup = True
    end
  end
  object DS_FaturaProduto: TDataSource
    DataSet = QR_FaturaProduto
    Left = 400
    Top = 144
  end
  object QR_Fatura: TADOQuery
    Connection = dtmSisnnovi.connSisnnovi
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT * FROM TB_FATURA')
    Left = 160
    Top = 365
  end
  object QR_Desconto: TADOQuery
    Connection = dtmSisnnovi.connSisnnovi
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT * FROM TB_DESCONTO')
    Left = 326
    Top = 340
  end
  object DS_Desconto: TDataSource
    DataSet = QR_Desconto
    Left = 329
    Top = 388
  end
end
